package laMalinche.test.annotatedRules;

import laMalinche.AnnotatedRules.Rule;
import laMalinche.AnnotatedRules.InScopeOf;
import laMalinche.testingPlayGround.testModel.PersonVo;
import laMalinche.rete.rule.BusinessRuleType;

/**
 * Created by IntelliJ IDEA.
 * User: ranran
 * Date: Aug 15, 2009
 * Time: 10:17:04 AM
 * To change this template use File | Settings | File Templates.
 */
public class ClassWithRules implements InScopeOf<PersonVo>{
    PersonVo personVo;

    @Rule()
    public void doXX(){
        personVo.getAge();
        personVo.setAge(13);
    }


    @Rule()
     public void doFather2XX(){
        personVo.getFather().setAge(personVo.getAge() + 5);
    }

    @Rule()
    public void doMother(){
        personVo.getMother().setAge(personVo.getFather().getAge() + 5);
    }

    public PersonVo getScope() {
        return personVo;  
    }

    public void setScope(PersonVo scope) {
       personVo = scope;
    }
}
